home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / resources / templates / library < prev    next >
Encoding:
Extensible Markup Language  |  2007-11-12  |  3.0 KB  |  82 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml"
  4.       xmlns:t="http://www.participatorypolitics.org/"
  5.       xmlns:i18n="http://www.participatoryculture.org/i18n"
  6.       eventCookie="@@@eventCookie@@@" dtvPlatform="@@@dtvPlatform@@@">
  7. <head>
  8.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  9.  
  10.     <link href="resource:css/main.css" rel="stylesheet" type="text/css" />
  11.     <t:include filename="dynamic.js" />
  12.     <t:include filename="settings.js" />
  13.     <script type="text/javascript" src="resource:templates/osxdnd.js" />
  14.     <t:execOnLoad><![CDATA[
  15.  
  16. filters.switchNewItemsChannel("library")
  17. sorts.switchUnwatchedFirstChannel("library")
  18.  
  19. def searchFilter(x):
  20.     return filters.matchingItems(x, app.controller.librarySearchTerm)
  21.  
  22. matchingItems = views.watchableItems.filter(lambda x:searchFilter(x) and x.getFeedURL() != "dtv:singleFeed",sortFunc=sorts.itemSortLibrary.sort,resort=True)
  23.  
  24. def updateSearchString(newSearch):
  25.     if len(newSearch) == 0:
  26.         app.controller.librarySearchTerm = None
  27.     else:
  28.         app.controller.librarySearchTerm = newSearch
  29.     views.watchableItems.recomputeFilter(matchingItems)
  30.  
  31. def setSortBy(by, section, handle):
  32.     sorts.itemSortLibrary.setSortBy(by)
  33.     views.watchableItems.recomputeSort(matchingItems)
  34.     handle.forceUpdate()
  35.  
  36. ]]>
  37.     </t:execOnLoad>
  38.     <t:execOnUnload><![CDATA[
  39. matchingItems.unlink()
  40. ]]>
  41.     </t:execOnUnload>
  42. </head>
  43.  
  44. <body onkeydown="sendKeyToSearchBox(event);">
  45.  
  46. <!-- TITLE BAR ************************************************************ -->
  47. <div id="main-titlebar">
  48.     <div id="main-icon" class="noborder"><img src="resource:images/collection-icon.png" /></div>
  49.     <h1 id="main-title" i18n:translate="">Library</h1>
  50.     <div id="search-box-container">
  51.         <div t:showIf="app.controller.librarySearchTerm is None">
  52.             <input id="search-box" type="search" onfocus="onSearchFocus(this)" onblur="endEditSearch()" value="***_('Find')***" />
  53.         </div>
  54.         <div t:showIf="app.controller.librarySearchTerm is not None">
  55.             <input id="search-box" type="search" onfocus="onSearchFocus(this)" onblur="endEditSearch()" value="***app.controller.librarySearchTerm***" searching="1"/>
  56.         </div>
  57.     </div>
  58. </div>
  59. <!-- / TITLE BAR -->
  60.  
  61. <div id="main-container">
  62.  
  63.     <!-- SORT BAR ************************************************************* -->
  64.     <div t:updateForView="matchingItems">
  65.         <div t:hideIf="matchingItems.len() == 0">
  66.             <t:executeTemplate filename="static-tab-sort-bar" 
  67.                     itemSort="sorts.itemSortLibrary"
  68.                     section="'main'" />
  69.         </div>
  70.     </div>
  71.     <!-- / SORT BAR -->
  72.     <div id="main-unwatched">
  73.     <!-- VIDEOS ************************************************** -->
  74.         <div t:repeatForView="matchingItems" t:repeatTemplate='download-item' t:containerDiv="true" />
  75.     <!-- / VIDEOS -->
  76.     </div>
  77.     
  78. </div>
  79.  
  80. </body>
  81. </html>
  82.